package com.itcast.activiti.domain;

import lombok.Data;
import lombok.experimental.FieldNameConstants;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 权限
 * </p>
 *
 * @author itcast
 * @since 2020-11-19
 */
@Data
@FieldNameConstants
public class Menu implements Serializable {

	private static final long serialVersionUID = 1L;

	private Integer id;

	/**
	 * 名称
	 */
	private String name;

	/**
	 * 父ID
	 */
	private Integer parentId;

	/**
	 * 类型（0 菜单 1 操作）
	 */
	private Integer type;

	/**
	 * true 选中
	 */
	private boolean selected;

	private List<Menu> children;

	public Menu(Integer id, Integer parentId, String name) {
		this.id = id;
		this.name = name;
		this.parentId = parentId;
	}
	public Menu(Integer id, Integer parentId, String name, Integer type) {
		this.id = id;
		this.name = name;
		this.parentId = parentId;
		this.type = type;
	}
}
